using TMPro;
using UnityEngine;
using UnityEngine.UI;

public class UI_CraftMaterialSlot : MonoBehaviour
{
    [SerializeField] private Image materialIcon;
    [SerializeField] private TextMeshProUGUI materialInfo;

    private ItemCraftMaterialInfo material;
    private int currentMaterialCount;
    private Inventory_Storage storage;
    private ItemDataSO itemData;


    public void UpdateMaterialSlot(ItemCraftMaterialInfo material,Inventory_Storage storage, int currentMaterialCount)
    {
        this.material = material;
        this.storage = storage;
        this.currentMaterialCount = currentMaterialCount;
        itemData = material.materialData;
        materialIcon.sprite = material.materialData.itemIcon;
        materialInfo.text = material.materialData.itemName + ": " + currentMaterialCount + "/" + material.requireMaterialCount;
    }
}
